package org.finesys.common.log.trace.interceptor.httpclient5;

import lombok.extern.slf4j.Slf4j;
import org.apache.hc.core5.http.EntityDetails;
import org.apache.hc.core5.http.HttpException;
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.HttpResponseInterceptor;
import org.apache.hc.core5.http.protocol.HttpContext;
import org.finesys.common.log.trace.interceptor.AbstractInterceptor;

import java.io.IOException;

import static org.finesys.common.log.constants.TraceConstants.HTTP_CLIENT_EXEC_AFTER;

@Slf4j
public class TraceIdHttpResponse5Interceptor extends AbstractInterceptor implements HttpResponseInterceptor {
    @Override
    public void process(HttpResponse httpResponse, EntityDetails entityDetails, HttpContext httpContext) throws HttpException, IOException {
        super.executeAfter(HTTP_CLIENT_EXEC_AFTER);
    }
}
